package Base.ProjectTest01.junit;

import Base.ProjectTest01.Domain.Employee;
import Base.ProjectTest01.Service.NameListService;
import Base.ProjectTest01.Service.TeamException;
import org.junit.Test;

public class NameListServiceTest {

    @Test
    public void testGetAllEmployee(){
        final NameListService nameListService = new NameListService();
        final Employee[] allEmployees = nameListService.getAllEmployees();
        for (Employee allEmployee : allEmployees) {
            System.out.println(allEmployee);
        }
    }

    @Test
    public void testGetEmployeeById(){
        final NameListService nameListService = new NameListService();

        try {
            final Employee employee = nameListService.getEmployee(15);
            System.out.println(employee);
        } catch (TeamException e) {
            System.out.println(e.getMessage());
        }

    }



}
